package io.github.uicdb.et;

import io.github.uicdb.et.net.ElementDataSerializer;
import net.minecraft.network.syncher.EntityDataSerializer;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;
import net.neoforged.neoforge.registries.NeoForgeRegistries;

public class ModEntityDataSerilizer {
    private static final DeferredRegister<EntityDataSerializer<?>> DATA_SERIALIZER_DEFERRED_REGISTER = DeferredRegister.create(NeoForgeRegistries.ENTITY_DATA_SERIALIZERS,ElementalTheory.MODID);
    public static final DeferredHolder<EntityDataSerializer<?>,ElementDataSerializer> ENTITY_DATA = DATA_SERIALIZER_DEFERRED_REGISTER.register("element",()->ElementDataSerializer.INSTANCE);
    public static void init(IEventBus bus){
        DATA_SERIALIZER_DEFERRED_REGISTER.register(bus);
    }
}
